
package ch.hearc.meteo.imp.com.simulateur.fonction;

public abstract class Fonctions_A
	{

	/*------------------------------------------------------------------*\
	|*							Constructeurs							*|
	\*------------------------------------------------------------------*/

	public Fonctions_A(double dt)
		{
		this.dt = dt;
		this.t = 0;
		}

	public Fonctions_A()
		{
		this(DT);
		}

	/*------------------------------------------------------------------*\
	|*							Attributs Private						*|
	\*------------------------------------------------------------------*/

	public abstract double f(double t);

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	public float value()
		{
		t += dt;

		return (float)f(t);
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	/*------------------------------------------------------------------*\
	|*							Attributs Private						*|
	\*------------------------------------------------------------------*/

	// Tools
	private double t;

	// Inputs
	private double dt;

	/*------------------------------*\
	|*			  Static			*|
	\*------------------------------*/

	private static final double DT = Math.PI / 100;

	}
